<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>

    <script>
        var a=["何涛1","何涛2","zhoufanling"];
        a["shuaige"]="史龙龙";
        for(var i in a){
            document.write(a[i]+"<br/>")
        }
        var n=prompt("请输入：","随意输入");
        if(n!=null){
            a.push(n);
        }else{
            alert("不得为空！");
        }
        alert(a);

    </script>

</head>
<body>

</body>
</html>